<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/12/20
  Time: 10:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Users</title>
    <%@page isELIgnored="false" %>
</head>
<body>
    <div class="context">
        <table border="1">
            <tr>
                <th>Id</th>
                <th>Name</th>
                <th>Sex</th>
            </tr>

            <c:forEach items="${users}" var="user">
                <tr>
                    <td>${user.id}</td>
                    <td>${user.name}</td>
                    <td>${user.sex}</td>
                </tr>
            </c:forEach>
        </table>

        <form action="${pageContext.request.contextPath}/users/save" method="post">
            姓名<input type="text" name="name"/></br>
            性别<input type="text" name="sex"/></br>
            <input type="submit" value="增加"></br>
        </form>
    </div>
</body>
</html>
